<?php

namespace App\Models\Traits;

trait HasUserGoldWaste
{
	public function myAllGoldWastesMoney()
	{
		return $this->goldWastes()->sum('record_price');
	}

    public function myAllGoldWastesCount(): int
    {
        return $this->goldWastes()->count();
    }

    public function hasGoldWastesOrderApplied(): bool
    {
        return (bool)$this->gold_wastes_order_at;
    }

    public function hasGoldWastesSubsidyApplied(): bool
    {
        return (bool)$this->gold_wastes_subsidy_at;
    }
}
